export type StoryItem = {
  id: number;
  title: string;
  description: string;
  priority: 'low' | 'medium' | 'high';
  status: 'new' | 'in-progress' | 'completed' | 'rejected';
  createdBy: {
    id: number;
    username: string;
    email: string;
    role: 'admin' | 'developer' | 'tester';
    status: 'normal' | 'disabled';
  };
  versionId: number | null;
  assignees: Array<{
    id: number;
    username: string;
    email: string;
    // role: 'admin' | 'developer' | 'tester';
    // projectRole: 'admin' | 'developer' | 'tester';
  }> | null;
  endsAt: string;
  projectId: number;
  createdAt: string;
  updatedAt: string;
  parentId: number | null;
  type: string
  children?: StoryItem[];
};

export type StoryParams = {
  title: string,
  description: string,
  priority: string,
  versionId?: number | null,
  parentId?: number | null,
  endsAt: string | null,
  type?: string
  assigneeIds: Array<{
    id: number
  }>
}

export type ParentStory = {
  id: number;
  title: string;
  description: string;
}

export type StoryResponse = {
  code: number;
  msg: string;
  data: StoryItem[]
}

export type ParentStoryResponse = {
  code: number;
  msg: string;
  data: ParentStory[]
}

export type NoneResponse = {
  code: number;
  msg: string;
  data: null
}
